home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 6 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.8 KB

  1. Path: zippy.cais.net!news
  2. From: mgeiger@drsystems.com (Mark Geiger)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: What's so different about 2-D arrays???
  5. Date: Tue, 02 Jan 1996 01:04:38 GMT
  6. Organization: Capital Area Internet Service info@cais.com 703-448-4470
  7. Message-ID: <4ca3j0$fsj@zippy.cais.net>
  8. References: <820451938.20697@fredblog.demon.co.uk> <4c799b$q9d@umbc9.umbc.edu>
  9. Reply-To: mgeiger@drsystems.com
  10. NNTP-Posting-Host: 205.252.35.151
  11. X-Newsreader: Forte Free Agent 1.0.82
  12.  
  13. schlein@umbc.edu (Jonas J. Schlein) wrote:
  14.  
  15. [snip]
  16.  
  17. >|> 
  18. >|> //My own chess recorder program
  19.  
  20. >Illegal comment! This is comp.lang.c not comp.lang.c++.
  21.  
  22. Give me a break.
  23.  
  24. >|> #include <stdio.h>
  25. >|> #include <ctype.h>
  26.  
  27. >Why do you need <ctype.h>?
  28.  
  29. What difference does it make?
  30.  
  31. >|> /*Prototypes*/
  32. >|> void setup(char pos[8][8]);   
  33. >|> 
  34. >|> void main()
  35.  
  36. >Please read the FAQ. This will show you why 'int main (void)' is the correct
  37. >declaration for your particular program.
  38.  
  39. Couldn't you have put this a bit more constructively?
  40.  
  41. >|> {
  42. >|> char pos[8][8];
  43. >|> 
  44. >|>     setup(pos);
  45. >|> 
  46. >|> 
  47. >|>     printf("\nWell Done!!");
  48.  
  49. >A simple 'return (0);' would go here nicely.
  50.  
  51. Not the way it was coded...main is a void function.  Yes, I know that
  52. he should return an explicit value and not some random garbage, but
  53. sarcasm is seldom helpful.
  54.  
  55. >|> }
  56. >|> 
  57. >|> void setup(char pos[8][8])
  58.  
  59. >What exactly do you think an array is and how do you believe it is
  60. >supposed to be indexed? In C arrays start at 0 so an array with
  61. >8 elements is indexed from 0-7 not 1-8. This is true for each and
  62. >every dimension of a multi-dimensional array.
  63.  
  64. IMHO, this is the only valuable paragraph in your post, but we could
  65. have done without the first sentence.
  66.  
  67. My point in responding in this manner is that people should be able to
  68. ask questions in this forum without being subjected to ridicule and
  69. petty criticism.
  70.  
  71.  
  72.  
  73.